﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace SWCInvoice.Model {
    public class ModelBase : INotifyPropertyChanged, IDataErrorInfo {
        protected void RaisePropertyChanged(string propertyName) {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        #region IDataErrorInfo Members

        public virtual string Error {
            get { return String.Empty; }
        }

        public virtual string this[string columnName] {
            get { return String.Empty; }
        }

        #endregion
    }
}
